#pragma once 

/*
@description: contains all physics behavior of gun, GunPhysics object will be set ref to Army entity to update and
set current physics state for object entity. this contains virtual update implement from IArmyPhysics interface
*/

#include "ArmyData.h"
#include "IArmyPhysics.h"
#include "BulletContainer.h"
#include "GunParameters.h"
#include "EffectManager.h"

class GunPhysics : public IArmyPhysics {
protected:
	int _life;
	/* Ref to Army data */
	ArmyData* _armyData;

	/* Set bullet container data */
	virtual void _initBulletContainer();

	/* Fire with target direction */
	virtual void _updateBulletContainer();

	virtual void _setToDead(int actiondata) ;
public:
	/* Constructor to set ref, with not null ref */
	GunPhysics(ArmyData* data);

	/* Implement from abstract update method.
	Check with target to set direction of bullet fired 	
	*/
	virtual void update(long timetick);

	virtual void setIsHurt(ACTIONS action, int action_data);
};